//
//  FriendsViewController.swift
//  weibo
//
//  Created by Fly on 2017/12/15.
//  Copyright © 2017年 Fly. All rights reserved.
//

import UIKit

class FriendsViewController: BaseViewController {

    override func viewDidLoad() {
        
        super.viewDidLoad()

        let str = String(navigationController?.childViewControllers.count ?? 0)
        
        title = "第 \(str) 个"
        
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
}

extension FriendsViewController {

    override func setupChildUI() {
        
        super.setupChildUI()
        
        navItem.rightBarButtonItem = UIBarButtonItem(title: "下一个", target: self, action: #selector(showNext))
        
    }

    @objc private func showNext() {
    
        let vc = FriendsViewController()
        
        navigationController?.pushViewController(vc, animated: true)
    
    }
    

}
